package org.sidora.strata.context.types;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.ImageIcon;
import org.openide.util.NbBundle;
import org.openide.util.Utilities;
import org.openide.windows.TopComponent;


/**
 * Action which shows Deposed component
 * @author Enric Tartera, Juan Manuel Gimeno, Roger Masgoret
 * @version 1.0
 */
public class DeposedAction extends AbstractAction {
    
    public DeposedAction() {
        super(NbBundle.getMessage(DeposedAction.class, "CTL_DeposedAction"));
//        putValue(SMALL_ICON, new ImageIcon(Utilities.loadImage(DeposedTopComponent.ICON_PATH, true)));
    }
    
    public void actionPerformed(ActionEvent evt) {
        TopComponent win = DeposedTopComponent.findInstance();
        win.open();
        win.requestActive();
    }
        public void actionPerformed() {
        DeposedTopComponent win = DeposedTopComponent.findInstance();
        win.open();
        win.requestActive();
        win.fillItems();
    }
        
        public void cerrar(){
            DeposedTopComponent win = DeposedTopComponent.findInstance();
            win.close();
        }
}
